/**
 * 类的实现层次结构
 */
public class CharDisplayImpl extends DisplayImpl{

    private char header;
    private char body;
    private char foot;

    public CharDisplayImpl(char header, char body, char foot) {
        this.header = header;
        this.body = body;
        this.foot = foot;
    }

    @Override
    public void openImpl() {
        System.out.print(header);
    }

    @Override
    public void printImpl() {
        System.out.print(body);
    }

    @Override
    public void closeImpl() {
        System.out.println(foot);
    }

}
